Page({
    data: {
        pic:'../../assets/img/user.png',
        userInfo:null,
        welcomeTip:'欢迎体验分销商城',
    },
    onLoad(){
        // this.getUserInfo()
    },
    onShow(){
        this.getUserInfo()
    },
    openPage(e) {
        my.navigateTo({
            url: e.target.dataset.url,
        })
    },
    getUserInfo(){
       let that = this;
        my.getStorage({
            key: 'userInfo',
            success: function(res) {
                if(res.data){
                    that.setData({
                        userInfo:res.data.userInfo
                    })
                }else{
                    that.setData({
                        userInfo:null
                    })
                }
            }
        }); 
    }
})